package com.share.three.f_schedule;

import org.apache.log4j.Logger;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Service;

@Service
public class TimerService {
	
	private static Logger log = Logger.getLogger("runLog");
	
	@Scheduled(cron="0/1 * *  * * ? ")   //每1秒执行一次 
	public void print() {
		System.out.println("再见孙悟空，你好唐三藏");
		log.info("再见孙悟空，你好唐三藏");
		
	}
	
}
